package homework.yuandan.common;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @author polly
 * @date 2020-12-15 10:55
 *
 */
@NoArgsConstructor
@AllArgsConstructor
public enum ResponseEnum {
    // 对应的错误信息
    SUCCESS_SERVER(200,"success"),
    SERVER_ERROR(501,"未知错误"),
    NOW_PLAYING_EMPTY(601,"当前没有热映"),
    COMING_PLAYING_EMPTY(601,"当前没有即将上映"),
    MOVIE_ID_NO_FOUND(602,"id不存在"),
    USER_NO_FOUND(603,"用户名不存在"),
    PASSWORD_WRONG(604,"密码有误"),
    TOKEN_ERROR(605,"token有误"),
    TOKEN_TIMEOUT(606,"token超时"),
    ROLE_NO_RIGHT(607,"该角色没有此权限"),
    ROLE_RIGHT_EMPTY(608,"该角色没有权限")
    ;
    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
